/*
 * Class50_Sub1_Sub4_Sub6 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
final class Class50_Sub1_Sub4_Sub6 extends Class50_Sub1_Sub4 {
	public int anInt1731;
	public int anInt1732;
	public int anInt1733;
	public int anInt1734;
	private boolean aBoolean1735 = true;
	public boolean aBoolean1736 = false;
	private int anInt1737;
	private int anInt1738;
	private SpotAnimation aSpotAnimation_1739;
	public int anInt1740;

	public final void method615(byte i, int i_0_) {
		anInt1738 += i_0_;
		if (i == 1) {
		} else {
			return;
		}
		while (anInt1738 > aSpotAnimation_1739.sequence.method205(0, anInt1737)) {
			anInt1738 -= aSpotAnimation_1739.sequence.method205(0, anInt1737);
			anInt1737++;
			if (anInt1737 >= aSpotAnimation_1739.sequence.anInt294
				&& (anInt1737 < 0 || anInt1737 >= aSpotAnimation_1739.sequence.anInt294)) {
				anInt1737 = 0;
				aBoolean1736 = true;
			}
		}
	}

	public Class50_Sub1_Sub4_Sub6(int i, int i_1_, int i_2_, int i_3_, int i_4_, int i_5_,
		int i_6_, int i_7_) {
		aSpotAnimation_1739 = SpotAnimation.spotAnims[i_4_];
		anInt1731 = i_1_;
		anInt1732 = i;
		anInt1733 = i_6_;
		if (i_7_ != 10709) {
			for (int i_8_ = 1; i_8_ > 0; i_8_++) {
				/* empty */
			}
		}
		anInt1734 = i_2_;
		anInt1740 = i_5_ + i_3_;
		aBoolean1736 = false;
	}

	@Override
	public final Model method572(byte i) {
		if (i != 3) {
			throw new NullPointerException();
		}
		Model model = aSpotAnimation_1739.method307();
		if (model == null) {
			return null;
		}
		int i_9_ = aSpotAnimation_1739.sequence.anIntArray295[anInt1737];
		Model model_10_ = new Model(false,
			false, true, model, Class21.method239(i_9_));
		if (!aBoolean1736) {
			model_10_.method595(7);
			model_10_.method596(i_9_, (byte) 6);
			model_10_.anIntArrayArray1679 = null;
			model_10_.anIntArrayArray1678 = null;
		}
		if (aSpotAnimation_1739.anInt561 != 128 || aSpotAnimation_1739.anInt562 != 128) {
			model_10_.method604(aSpotAnimation_1739.anInt562, aSpotAnimation_1739.anInt561, 9,
				aSpotAnimation_1739.anInt561);
		}
		if (aSpotAnimation_1739.anInt563 != 0) {
			if (aSpotAnimation_1739.anInt563 == 90) {
				model_10_.method599(true);
			}
			if (aSpotAnimation_1739.anInt563 == 180) {
				model_10_.method599(true);
				model_10_.method599(true);
			}
			if (aSpotAnimation_1739.anInt563 == 270) {
				model_10_.method599(true);
				model_10_.method599(true);
				model_10_.method599(true);
			}
		}
		model_10_.preProcess(aSpotAnimation_1739.anInt564 + 64,
			aSpotAnimation_1739.anInt565 + 850, -30, -50, -30, true);
		return model_10_;
	}
}
